majority element google coding interview question